package com.xbongbong.saas.domain.dao;

import com.xbongbong.saas.domain.entity.PromotionActivityEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface PromotionActivityDao {
    Long insert(PromotionActivityEntity entity);

    void insertBatch(List<PromotionActivityEntity> list);

    PromotionActivityEntity getByKey(@Param("key") Long key, @Param("corpid") String corpid );

    Integer update(PromotionActivityEntity entity);

    List<PromotionActivityEntity> findEntities(@Param("param") Map<String, Object> param);

    Integer getEntitiesCount(@Param("param") Map<String, Object> param);

    List<Integer> getDisabledPriority(@Param("corpid") String corpid, @Param("businessType")Integer businessType);

    Integer deleteByKey(@Param("key")Long key,@Param("corpid") String corpid);

    Integer getOnlinePromotionCount(@Param("corpid")String corpid);

    void updateStatus(@Param("list") List<PromotionActivityEntity> updateList, @Param("corpid")String corpid);
}